<?php
/**
 * Created by PhpStorm.
 * User: wzy12
 * Date: 2018/10/14
 * Time: 18:09
 */

namespace app\admin\validate;


use think\Validate;

class AdPosition extends Validate
{
    protected $rule = [
        'id'  =>  'require|number',
        '__token__' => 'token|require',
        'position_name|广告位名称' =>  'require',
        'ad_width|广告位宽度' =>  'require',
        'ad_height|广告位宽度' =>  'require',
        'is_open' => 'require',
    ];

    protected $message = [
        '__token__.require'  =>  '请不要进行非法操作',
        'is_open.require' => '请不要进行非法操作'
    ];

    protected $scene = [
        'form' => ['__token__', 'position_name', 'ad_width', 'ad_height'],
        'del' => ['__token__']
    ];
}